/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "taxonomicelement")
@NamedQueries({
    @NamedQuery(name = "Taxonomicelement.findAll", query = "SELECT t FROM Taxonomicelement t"),
    @NamedQuery(name = "Taxonomicelement.findByIdtaxonomicelement", query = "SELECT t FROM Taxonomicelement t WHERE t.idtaxonomicelement = :idtaxonomicelement"),
    @NamedQuery(name = "Taxonomicelement.findByHigherclassification", query = "SELECT t FROM Taxonomicelement t WHERE t.higherclassification = :higherclassification"),
    @NamedQuery(name = "Taxonomicelement.findByVerbatimtaxonrank", query = "SELECT t FROM Taxonomicelement t WHERE t.verbatimtaxonrank = :verbatimtaxonrank"),
    @NamedQuery(name = "Taxonomicelement.findByVernacularname", query = "SELECT t FROM Taxonomicelement t WHERE t.vernacularname = :vernacularname"),
    @NamedQuery(name = "Taxonomicelement.findByNomenclaturalstatus", query = "SELECT t FROM Taxonomicelement t WHERE t.nomenclaturalstatus = :nomenclaturalstatus"),
    @NamedQuery(name = "Taxonomicelement.findByTaxonremark", query = "SELECT t FROM Taxonomicelement t WHERE t.taxonremark = :taxonremark")})
public class Taxonomicelement implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idtaxonomicelement")
    private Integer idtaxonomicelement;
    @Basic(optional = false)
    @Column(name = "higherclassification")
    private String higherclassification = "";
    @Column(name = "verbatimtaxonrank")
    private String verbatimtaxonrank;
    @Column(name = "vernacularname")
    private String vernacularname;
    @Column(name = "nomenclaturalstatus")
    private String nomenclaturalstatus;
    @Column(name = "taxonremark")
    private String taxonremark;
    @OneToMany(mappedBy = "taxonomicelement", fetch = FetchType.LAZY)
    private List<Specimen> specimenList;
    @JoinColumn(name = "idtaxonrank", referencedColumnName = "idtaxonrank")
    @ManyToOne(fetch = FetchType.LAZY)
    private Taxonrank taxonrank;
    @JoinColumn(name = "idtaxonomicstatus", referencedColumnName = "idtaxonomicstatus")
    @ManyToOne(fetch = FetchType.LAZY)
    private Taxonomicstatus taxonomicstatus;
    @JoinColumn(name = "idtaxonconcept", referencedColumnName = "idtaxonconcept")
    @ManyToOne(fetch = FetchType.LAZY)
    private Taxonconcept taxonconcept;
    @JoinColumn(name = "idsubgenus", referencedColumnName = "idsubgenus")
    @ManyToOne(fetch = FetchType.LAZY)
    private Subgenus subgenus;
    @JoinColumn(name = "idspecificepithet", referencedColumnName = "idspecificepithet")
    @ManyToOne(fetch = FetchType.LAZY)
    private Specificepithet specificepithet;
    @JoinColumn(name = "idscientificnameauthorship", referencedColumnName = "idscientificnameauthorship")
    @ManyToOne(fetch = FetchType.LAZY)
    private Scientificnameauthorship scientificnameauthorship;
    @JoinColumn(name = "idscientificname", referencedColumnName = "idscientificname")
    @ManyToOne(fetch = FetchType.LAZY)
    private Scientificname scientificname;
    @JoinColumn(name = "idacceptednameusage", referencedColumnName = "idacceptednameusage")
    @ManyToOne(fetch = FetchType.LAZY)
    private Acceptednameusage acceptednameusage;
    @JoinColumn(name = "idclass", referencedColumnName = "idclass")
    @ManyToOne(fetch = FetchType.LAZY)
    private Class class1;
    @JoinColumn(name = "idfamily", referencedColumnName = "idfamily")
    @ManyToOne(fetch = FetchType.LAZY)
    private Family family;
    @JoinColumn(name = "idgenus", referencedColumnName = "idgenus")
    @ManyToOne(fetch = FetchType.LAZY)
    private Genus genus;
    @JoinColumn(name = "idinfraspecificepithet", referencedColumnName = "idinfraspecificepithet")
    @ManyToOne(fetch = FetchType.LAZY)
    private Infraspecificepithet infraspecificepithet;
    @JoinColumn(name = "idkingdom", referencedColumnName = "idkingdom")
    @ManyToOne(fetch = FetchType.LAZY)
    private Kingdom kingdom;
    @JoinColumn(name = "idnameaccordingto", referencedColumnName = "idnameaccordingto")
    @ManyToOne(fetch = FetchType.LAZY)
    private Nameaccordingto nameaccordingto;
    @JoinColumn(name = "idnamepublishedin", referencedColumnName = "idnamepublishedin")
    @ManyToOne(fetch = FetchType.LAZY)
    private Namepublishedin namepublishedin;
    @JoinColumn(name = "idnomenclaturalcode", referencedColumnName = "idnomenclaturalcode")
    @ManyToOne(fetch = FetchType.LAZY)
    private Nomenclaturalcode nomenclaturalcode;
    @JoinColumn(name = "idorder", referencedColumnName = "idorder")
    @ManyToOne(fetch = FetchType.LAZY)
    private Order1 order1;
    @JoinColumn(name = "idoriginalnameusage", referencedColumnName = "idoriginalnameusage")
    @ManyToOne(fetch = FetchType.LAZY)
    private Originalnameusage originalnameusage;
    @JoinColumn(name = "idparentnameusage", referencedColumnName = "idparentnameusage")
    @ManyToOne(fetch = FetchType.LAZY)
    private Parentnameusage parentnameusage;
    @JoinColumn(name = "idphylum", referencedColumnName = "idphylum")
    @ManyToOne(fetch = FetchType.LAZY)
    private Phylum phylum;

    public Taxonomicelement() {
    }

    public Taxonomicelement(Integer idtaxonomicelement) {
        this.idtaxonomicelement = idtaxonomicelement;
    }

    public Taxonomicelement(Integer idtaxonomicelement, String higherclassification) {
        this.idtaxonomicelement = idtaxonomicelement;
        this.higherclassification = higherclassification;
    }

    public Integer getIdtaxonomicelement() {
        return idtaxonomicelement;
    }

    public void setIdtaxonomicelement(Integer idtaxonomicelement) {
        this.idtaxonomicelement = idtaxonomicelement;
    }

    public String getHigherclassification() {
        return higherclassification;
    }

    public void setHigherclassification(String higherclassification) {
        this.higherclassification = higherclassification;
    }

    public String getVerbatimtaxonrank() {
        return verbatimtaxonrank;
    }

    public void setVerbatimtaxonrank(String verbatimtaxonrank) {
        this.verbatimtaxonrank = verbatimtaxonrank;
    }

    public String getVernacularname() {
        return vernacularname;
    }

    public void setVernacularname(String vernacularname) {
        this.vernacularname = vernacularname;
    }

    public String getNomenclaturalstatus() {
        return nomenclaturalstatus;
    }

    public void setNomenclaturalstatus(String nomenclaturalstatus) {
        this.nomenclaturalstatus = nomenclaturalstatus;
    }

    public String getTaxonremark() {
        return taxonremark;
    }

    public void setTaxonremark(String taxonremark) {
        this.taxonremark = taxonremark;
    }

    public List<Specimen> getSpecimenList() {
        return specimenList;
    }

    public void setSpecimenList(List<Specimen> specimenList) {
        this.specimenList = specimenList;
    }

    public Taxonrank getTaxonrank() {
        return taxonrank;
    }

    public void setTaxonrank(Taxonrank taxonrank) {
        this.taxonrank = taxonrank;
    }

    public Taxonomicstatus getTaxonomicstatus() {
        return taxonomicstatus;
    }

    public void setTaxonomicstatus(Taxonomicstatus taxonomicstatus) {
        this.taxonomicstatus = taxonomicstatus;
    }

    public Taxonconcept getTaxonconcept() {
        return taxonconcept;
    }

    public void setTaxonconcept(Taxonconcept taxonconcept) {
        this.taxonconcept = taxonconcept;
    }

    public Subgenus getSubgenus() {
        return subgenus;
    }

    public void setSubgenus(Subgenus subgenus) {
        this.subgenus = subgenus;
    }

    public Specificepithet getSpecificepithet() {
        return specificepithet;
    }

    public void setSpecificepithet(Specificepithet specificepithet) {
        this.specificepithet = specificepithet;
    }

    public Scientificnameauthorship getScientificnameauthorship() {
        return scientificnameauthorship;
    }

    public void setScientificnameauthorship(Scientificnameauthorship scientificnameauthorship) {
        this.scientificnameauthorship = scientificnameauthorship;
    }

    public Scientificname getScientificname() {
        return scientificname;
    }

    public void setScientificname(Scientificname scientificname) {
        this.scientificname = scientificname;
    }

    public Acceptednameusage getAcceptednameusage() {
        return acceptednameusage;
    }

    public void setAcceptednameusage(Acceptednameusage acceptednameusage) {
        this.acceptednameusage = acceptednameusage;
    }

    public Class getClass1() {
        return class1;
    }

    public void setClass1(Class class1) {
        this.class1 = class1;
    }

    public Family getFamily() {
        return family;
    }

    public void setFamily(Family family) {
        this.family = family;
    }

    public Genus getGenus() {
        return genus;
    }

    public void setGenus(Genus genus) {
        this.genus = genus;
    }

    public Infraspecificepithet getInfraspecificepithet() {
        return infraspecificepithet;
    }

    public void setInfraspecificepithet(Infraspecificepithet infraspecificepithet) {
        this.infraspecificepithet = infraspecificepithet;
    }

    public Kingdom getKingdom() {
        return kingdom;
    }

    public void setKingdom(Kingdom kingdom) {
        this.kingdom = kingdom;
    }

    public Nameaccordingto getNameaccordingto() {
        return nameaccordingto;
    }

    public void setNameaccordingto(Nameaccordingto nameaccordingto) {
        this.nameaccordingto = nameaccordingto;
    }

    public Namepublishedin getNamepublishedin() {
        return namepublishedin;
    }

    public void setNamepublishedin(Namepublishedin namepublishedin) {
        this.namepublishedin = namepublishedin;
    }

    public Nomenclaturalcode getNomenclaturalcode() {
        return nomenclaturalcode;
    }

    public void setNomenclaturalcode(Nomenclaturalcode nomenclaturalcode) {
        this.nomenclaturalcode = nomenclaturalcode;
    }

    public Order1 getOrder1() {
        return order1;
    }

    public void setOrder1(Order1 order1) {
        this.order1 = order1;
    }

    public Originalnameusage getOriginalnameusage() {
        return originalnameusage;
    }

    public void setOriginalnameusage(Originalnameusage originalnameusage) {
        this.originalnameusage = originalnameusage;
    }

    public Parentnameusage getParentnameusage() {
        return parentnameusage;
    }

    public void setParentnameusage(Parentnameusage parentnameusage) {
        this.parentnameusage = parentnameusage;
    }

    public Phylum getPhylum() {
        return phylum;
    }

    public void setPhylum(Phylum phylum) {
        this.phylum = phylum;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idtaxonomicelement != null ? idtaxonomicelement.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Taxonomicelement)) {
            return false;
        }
        Taxonomicelement other = (Taxonomicelement) object;
        if ((this.idtaxonomicelement == null && other.idtaxonomicelement != null) || (this.idtaxonomicelement != null && !this.idtaxonomicelement.equals(other.idtaxonomicelement))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Taxonomicelement[idtaxonomicelement=" + idtaxonomicelement + "]";
    }

}
